import json
import os


def read_json_data(filename,key):
    filepath = os.path.dirname(os.path.dirname(__file__)) + os.sep + "data" + os.sep + filename
    with open(filepath,"r",encoding="utf-8") as f:
        data= json.load(f)
        json_list = []
        for item in data.get(key):
            tmp= tuple(item.values())
            json_list.append(tmp)
    return json_list


if __name__ == '__main__':
    print(read_json_data("../data/ihrm_login.json", 'login'))

